var express = require('express');
var router = express.Router();

const userDao = require('../dao/userDao');
//添加单条
router.get('/add', function(req, res, next) {
    userDao.add(req, res, next)
});
//查询所有
router.get('/queryAll', function(req, res, next) {
    userDao.queryAll(req, res, next)
});
//删除数据
router.get('/delete', function(req, res, next) {
    userDao.delete(req, res, next)
});
//页面跳转
router.get('/', function(req, res, next) {
    res.render('usersAdd', { title: 'Express' });
});


module.exports = router;